from typing import Optional
from datetime import datetime
from sqlmodel import SQLModel, Field
from .resBase import BaseResponse, PaginationRequest, PaginatedResponse, PaginationInfo


# football_europe_odds_500表模型
class FootballEuropeOdds(SQLModel, table=True):
    __tablename__: str = "football_europe_odds_500"
    
    id: Optional[int] = Field(default=None, primary_key=True, description="ID")
    fid: int = Field(description="比赛ID")
    company_id: int = Field(description="博彩公司ID")
    home_odds: Optional[float] = Field(default=None, description="主队赔率")
    draw_odds: Optional[float] = Field(default=None, description="平局赔率")
    away_odds: Optional[float] = Field(default=None, description="客队赔率")
    create_time: Optional[datetime] = Field(default=None, description="创建时间")


# football_europe_odds_500表查询条件模型
class FootballEuropeOddsCondition(SQLModel):
    fid: int = Field(description="比赛ID")


# football_europe_odds_500表响应模型
class FootballEuropeOddsResultResponse(BaseResponse):
    data: Optional[list[FootballEuropeOdds]] = None
